package com.weichen.xd.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Dune on 2017/8/23.
 */

public class Weather implements Parcelable {


    public static final Creator<Weather> CREATOR = new Creator<Weather>() {
        @Override
        public Weather createFromParcel(Parcel source) {
            return new Weather(source);
        }

        @Override
        public Weather[] newArray(int size) {
            return new Weather[size];
        }
    };
    /**
     * cond : {"code":"104","txt":"阴"}
     * fl : 11
     * hum : 31
     * pcpn : 0
     * pres : 1025
     * tmp : 13
     * vis : 10
     * wind : {"deg":"40","dir":"东北风","sc":"4-5","spd":"24"}
     */

//    @SerializedName("cond")
//    private Cond cond;
    @SerializedName("fl")
    private String fl;
    @SerializedName("hum")
    private String hum;
    @SerializedName("pcpn")
    private String pcpn;
    @SerializedName("pres")
    private String pres;
    @SerializedName("tmp")
    private String tmp;
    @SerializedName("vis")
    private String vis;

    private Weather() {
    }

    protected Weather(Parcel in) {
        this.fl = in.readString();
        this.hum = in.readString();
        this.pcpn = in.readString();
        this.pres = in.readString();
        this.tmp = in.readString();
        this.vis = in.readString();
    }

    public String getHum() {
        return hum;
    }

    public void setHum(String hum) {
        this.hum = hum;
    }

    public String getPcpn() {
        return pcpn;
    }

    public void setPcpn(String pcpn) {
        this.pcpn = pcpn;
    }

    public String getPres() {
        return pres;
    }

    public void setPres(String pres) {
        this.pres = pres;
    }

    public String getTmp() {
        return tmp;
    }

    public void setTmp(String tmp) {
        this.tmp = tmp;
    }

    public String getVis() {
        return vis;
    }
//    @SerializedName("wind")
//    private Wind wind;

    public void setVis(String vis) {
        this.vis = vis;
    }

    public String getFl() {

        return fl;
    }

    public void setFl(String fl) {
        this.fl = fl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.fl);
        dest.writeString(this.hum);
        dest.writeString(this.pcpn);
        dest.writeString(this.pres);
        dest.writeString(this.tmp);
        dest.writeString(this.vis);
    }
}
